unit Test_MyMsg_UsingUnit2;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, mymsgs, StdCtrls;

type
  TForm2 = class(TForm)
    Button1: TButton;
    procedure FormCreate(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
    msg:Tmymsg;
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation

{$R *.dfm}

procedure TForm2.FormCreate(Sender: TObject);
begin
    msg:=Tmymsg.GetInstance;
end;

procedure TForm2.FormDestroy(Sender: TObject);
begin
    msg.ReleaseInstance;
end;

procedure TForm2.Button1Click(Sender: TObject);
begin
//    msg.ShowMyMsg('Test!');
end;

end.
